local args = {key=KEYS[1],start=ARGV[1],_end=ARGV[2],price=ARGV[3]}
local arg_price = string.match(args.price,'(%d+.+%d+)')
local records = redis.call('LRANGE',args.key,args.start,args._end)
local result={}
for k,v in pairs(records) do
	local up = string.sub(v,4,4)
	local _,_e = string.find(v,'|')
	local price = string.sub(v,6,_e-1)
	if((up == '1' and arg_price > price) or (up == '0' and arg_price < price)) then
		local newValue = '\"1'..string.sub(v,3)
		table.insert(result,newValue)
	end
end
return result
